class ToDraw{
    private int i;

    public ToDraw(int i) {
        this.i = i;
    }

    public void tri() {
        for (int p = 1; p <= i; p++) {
            for (int q = 1; q <= p; q++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }

    public void square() {
        for (int p = 1; p <= i; p++) {
            for (int q = 1; q <= i; q++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }

    public void parall() {
        for (int m = 1; m <= i; m++) {
            if (m > 1) {
                for (int q = 1; q <= m - 1; q++) {
                    System.out.print(" ");
                }
            }
            for (int k = 1; k <= i; k++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }

    public void rect() {
        for (int m = 1; m <= i + 5; m++) {
            for (int k = 1; k <= i - 1; k++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }

}
public class Draw {
    public static void main(String[] args) {
        ToDraw dwg1 = new ToDraw(4);
        ToDraw dwg2 = new ToDraw(6);
        ToDraw dwg3 = new ToDraw(5);
        ToDraw dwg4 = new ToDraw(8);

        dwg1.tri();
        System.out.println();
        dwg2.square();
        System.out.println();
        dwg3.parall();
        System.out.println();
        dwg4.rect();
    }
}
